﻿function EditMerchant() {
    var model = {};
    model.Name = $("#Name").val();
    model.Birthday = $("#Birthday").val();
    model.Mobile = $("#Mobile").val();
    model.Address = $("#Address").val();
    DoPostAction(model, "/MerchantInfo/EditMerchant")
}
function CardInfo() {
    var model = {};
    model.MerchantId = $("#MerchantId").val();
    model.RealName = $("#RealName").val();
    model.CardNo = $("#CardNo").val();
    model.Positive = $("#PreviewPositive")[0].src;
    model.Opposite = $("#PreviewReverse")[0].src;
    DoPostAction(model, "/MerchantInfo/EditCardInfo");
}
function EditBusinessLicenseInfo() {
    var model = {};
    model.MerchantId = $("#MerchantId").val();
    model.LegalPerson = $("#LegalPerson").val();
    model.TermValidity = $("#TermValidity").val();
    model.LicensePIc = $("#PreviewLicense")[0].src;
    DoPostAction(model, "/MerchantInfo/EditBusinessLicenseInfo");
}
$(function () {
    /*******使用Ajax 方式处理传输*******/
    var uploader = $('#uploadPositive').uploader({
        url: '/common/Ajax_Thumb',
        fileExts: 'jpg;png;gif;',
        handleType: '1',
        text: '选择图片',
        onSuccess: function (data) {
            $('#PreviewPositive').attr('src', data.Data.small);
        }
    });

    /*******使用Ajax 方式处理传输*******/
    var uploader = $('#uploadReverse').uploader({
        url: '/common/Ajax_Thumb',
        fileExts: 'jpg;png;gif;',
        handleType: '1',
        text: '选择图片',
        onSuccess: function (data) {
            $('#PreviewReverse').attr('src', data.Data.small);
        }
    });

    /*******使用Ajax 方式处理传输*******/
    var uploader = $('#uploadLicense').uploader({
        url: '/common/ajax_thumb',
        fileExts: 'jpg;png;gif;',
        handleType: '1',
        text: '选择图片',
        onSuccess: function (data) {
            $('#PreviewLicense').attr('src', data.Data.small);
        }
    });
});